interface ISwim {
  swimming: () => void;
}

interface IEat {
  eating: () => void;
}

class Animal {}

// 继承：只能实现单继承
// 实现：实现接口，类可以实现多个接口
class Fish extends Animal implements ISwim, IEat {
  swimming() {
    console.log("Fish swimming");
  }
  
  eating() {
    console.log("Fish eating");
  }
}

class Person implements ISwim {
  swimming() {
    console.log("Person Swimming");
  }
}
